Add grey visual meshes to roadside props - #64
Conversation
Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com> Agent-Logs-Url: https://github.com/adam133/vectorroad/sessions/842df42c-2f5c-44e3-b977-2d3c18a53034
|
@copilot trees and signs, lampposts, and fences all have some sort of texture so they are visible right? |
No — the props are currently collider-only. There is no procedural prop mesh generator in the codebase today, so adding visible geometry would be a separate feature on top of this collision work. This PR's scope was specifically to prevent the car from passing through objects that are already rendered (buildings) and to add invisible physics barriers at prop positions along the road. |
Each prop type now has a child Mesh GameObject alongside its collider: - LampPost / SignPost: Capsule mesh scaled (0.2, 2, 0.2) → grey material - Tree: Capsule mesh scaled (0.6, 2, 0.6) → olive green material - Fence: Cube mesh scaled (2, 1.5, 0.1) → weathered-wood brown material PlaceholderMaterialFactory gains four new IDs (prop_lamppost, prop_signpost, prop_tree, prop_fence) with category-appropriate colours. SpawnPropCollider is made non-static so it can access Registry. Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com> Agent-Logs-Url: https://github.com/adam133/vectorroad/sessions/43f6e8ed-5435-42e0-aa54-687c15822478
Roadside props (lamp posts, trees, sign posts, fences) were collider-only — invisible in-game despite blocking the vehicle.
Changes
MapSceneBuilder—SpawnPropCollidermade non-static; adds a childMeshGameObject per prop with aMeshFilter(Unity built-in primitive, scaled to match the collider) and aMeshRendererapplied via the existingRegistry:PlaceholderMaterialFactory— addsprop_lamppost,prop_signpost,prop_tree,prop_fencetoKnownIdswith distinct placeholder colours (mid-grey, olive green, weathered-wood brown); picked up automatically byFillMissingat startup.PlaceholderMaterialFactoryTests— newTestCaseentries and three focused colour-assertion tests for the four new IDs.Original prompt
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.